Median (fld), Median (fld, condFld), Median (fld, condFld, cond)

Basic and Crystal syntax.

Arguments
Returns

Fractional Number

Action

Calculates the median of the given numeric fields. The median is the middle value in a sequence of numeric values (or the average of the two middle values in an even-numbered sequence of values).

For example:

Examples

The following examples are applicable to both Basic and Crystal syntax:

Median({Customer.LAST YEAR'S SALES})

Returns $29087, where the values of the Last Year's Sales field are $27014, $28000, $29087, $34500, and $48260.

Median({Customer.LAST YEAR'S SALES}, {Customer.REGION)

Groups the Last Year's Sales field by region and returns the median of the Last Year's Sales field per region.

Median({orders.ORDER AMOUNT}, {Customer.REGION}, "monthly")

Groups values in the Amount field by region, then returns the median of the order amount for each region per month.

Note:    Using this function in a formula forces the formula to be evaluated at print time.

For more information on evaluation time considerations, see Evaluation Time functions.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com